import $ from '../common';
Page({
  data: {
    titleHeight: $.gData().titleHeight,
    statuHeight: $.gData().statuHeight,

    info: {}
  },
  getinfo() {
    const {
      lesson_uuid
    } = this.data
    $.get('/teacher/lesson/detail', {
      lesson_uuid
    }, res => {
      if (res.review.length>0) {
        res.review.forEach(v => {
          let a=v.time_review.split(' ')[0]
          v.update = a.split('-')[1] + '-' + a.split('-')[2]
        });
      }
      this.setData({
        info: res
      })
    })
  },
  onLoad(e) {
    const {
      lesson_uuid
    } = e
    this.setData({
      lesson_uuid
    })
    this.getinfo()
  },
  onShow() {}
})